<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		
		<script type="text/javascript">
			
			Object.prototype.nengli="学习"
			
			function Father(car){
				this.car = car ;
				this.say=function(){
					console.log("我有一辆",this.car);
				}
			}
			
			function Son(phone){
				this.phone = phone;
			}
			
			var f1=new Father("三蹦子");
			console.log("f1:",f1);
			
			fgx()
			// Son.prototype=f1;
			Son.prototype=new Father("独轮车")
			
			var s1=new Son("大哥大");
			var s2=new Son("BB机")
			console.log("f1:",f1);
			console.log("s1:",s1);
			console.log("s2:",s2);
			fgx();
			console.log("s1.car:",s1.car);
			console.log("s2.car:",s2.car);
			fgx();
			s1.say();
			s2.say();
			
			
			function fgx(str=""){
				console.log(str+"-=-=-=-=-=-=-=-=-=-=-=")
			}
			
		</script>
	</body>
</html>
